package cn.edu.zust.se;

import cn.edu.zust.se.mapper.xml.UserMapper;
import cn.edu.zust.se.model.User;
import com.alibaba.fastjson.JSON;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
        ApplicationContext ac=new ClassPathXmlApplicationContext("beans.xml");
        UserMapper mapper=ac.getBean(UserMapper.class);
        User u=mapper.getUserById(5);
        System.out.println(JSON.toJSONString(u));
    }
}
